gh-62587: Add 'symbols' link to pydoc's html menu bar#13225
gh-62587: Add 'symbols' link to pydoc's html menu bar#13225CuriousLearner wants to merge 3 commits into
Conversation
ZackerySpytz
left a comment
There was a problem hiding this comment.
There are several CI failures.
When creating a PR based on someone else's patch, the developer's guide states that the "Co-authored-by" syntax should be used in the commit message to attribute the original patch author.
| self.maxdict = 10 | ||
| self.maxstring = self.maxother = 100 | ||
|
|
||
| def escape(self, text): |
There was a problem hiding this comment.
It seems that removing this method causes a failure in test_cgitb.
|
|
||
| heading = html.heading( | ||
| '<big><big><strong>INDEX</strong></big></big>', | ||
| '<big><big><strong>%s</strong></big></big>' % title.upper(), |
There was a problem hiding this comment.
I think an f-string should be used here.
| title = 'SYMBOL' | ||
| contents, xrefs = htmlhelp._getsymbol(topic) | ||
| else: | ||
| raise ValueError('could not find topic %s' % repr(topic)) |
There was a problem hiding this comment.
I think an f-string should be used here.
|
|
||
| def bltinlink(name): | ||
| return '<a href="topic?key=%s">%s</a>' % (name, name) | ||
| return '<a href="topic?key=%s">%s</a>' % (html_escape(name), html_escape(name)) |
There was a problem hiding this comment.
PEP 8 states that lines should be limited to 79 chars.
|
@CuriousLearner, please address the code reviews. Thanks! |
b89cd6b to
5a2112f
Compare
c46ecc5 to
90614a6
Compare
90614a6 to
4156e4e
Compare
- Added 'symbols' navigation link alongside 'topics' and 'keywords' - Refactored html_topicindex() to handle topics, keywords, and symbols - Added _getsymbol() method to Helper class for symbol lookup - Restored escape() method in HTMLRepr and HTMLDoc classes - Updated test suite to include symbols link verification - Modernized string formatting using f-strings Original patch by Ron Adam. Co-authored-by: Ron Adam <ron3200@gmail.com>
4156e4e to
4adc99e
Compare
|
This PR is stale because it has been open for 30 days with no activity. |
|
This PR is stale because it has been open for 30 days with no activity. |
https://bugs.python.org/issue18387
Ref #62587